﻿using agsXMPP.Xml.Dom;

namespace Lapd.Common.CustomStanzas
{
    public class New: Element
    {
        /*
            <new datatype="MoteSample.SampleTopic" instancename="SampleTopic">
		    </new>
         */

        public New()
        {
            TagName = ServiceDdsConstants.NEW_TAG;
        }

        public New(string datatType, string instanceName)
            : this()
        {
            DataType = datatType;
            InstanceName = instanceName;
        }

        public string DataType
        {
            get
            {
                return GetAttribute(ServiceDdsConstants.NEW_DATA_TYPE_ATTRIBUTE);
            }

            set
            {
                SetAttribute(ServiceDdsConstants.NEW_DATA_TYPE_ATTRIBUTE, value);
            }
        }

        public string InstanceName
        {
            get
            {
                return GetAttribute(ServiceDdsConstants.NEW_INSTANCE_ATTRIBUTE);
            }

            set
            {
                SetAttribute(ServiceDdsConstants.NEW_INSTANCE_ATTRIBUTE, value);
            }
        }
    }
}
